package cn.com.api.service.impl.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiT_user_admin;

import cn.com.api.mapper.ApiT_user_adminMapper;

import cn.com.api.service.ApiT_user_adminService;

/**
 * 
 **/
@Service
public class T_user_adminServiceImplBase {
	@Autowired
	private ApiT_user_adminMapper apiT_user_adminMapper;
    
    // 根据id获取
	public ApiT_user_admin findT_user_adminById(Integer id){
		ApiT_user_admin t_user_admin = apiT_user_adminMapper.findT_user_adminById( id );
		return t_user_admin;
	}
    
    //查看数据集
	public List<ApiT_user_admin> findT_user_admins(){
        List<ApiT_user_admin> t_user_admins = apiT_user_adminMapper.findT_user_admins();
		return t_user_admins;
    }
    
	// 添加
	public int insertT_user_admin(ApiT_user_admin t_user_admin){
		int ret_I= apiT_user_adminMapper.insertT_user_admin(t_user_admin);
		return ret_I;
	}

	// 修改
	public int updateT_user_admin(ApiT_user_admin t_user_admin){
		int ret_I= apiT_user_adminMapper.updateT_user_admin(t_user_admin);
		return ret_I;
	}
	
    // 删除
	public int deleteT_user_admin(Integer id){
		int ret_I= apiT_user_adminMapper.deleteT_user_admin( id );
		return ret_I;
	}
	
    // Foreign keys revelant		
		
	//删除根据City_id
    public int T_user_adminDeleteByCity_id(String city_id){
		int ret_I= apiT_user_adminMapper.T_user_adminDeleteByCity_id(city_id);
		return ret_I;
	}
	
    //获取根据City_id
    public List<ApiT_user_admin> findT_user_adminsByCity_id(String city_id){
        List<ApiT_user_admin> t_user_admins = apiT_user_adminMapper.findT_user_adminsByCity_id(city_id);
		return t_user_admins;
    }

		
	//删除根据Role_id
    public int T_user_adminDeleteByRole_id(String role_id){
		int ret_I= apiT_user_adminMapper.T_user_adminDeleteByRole_id(role_id);
		return ret_I;
	}
	
    //获取根据Role_id
    public List<ApiT_user_admin> findT_user_adminsByRole_id(String role_id){
        List<ApiT_user_admin> t_user_admins = apiT_user_adminMapper.findT_user_adminsByRole_id(role_id);
		return t_user_admins;
    }

		

	//region Indexs revelant
    
    
    //获取根据user_name	
    public List<ApiT_user_admin> findT_user_adminsByUser_name(String user_name){
        List<ApiT_user_admin> t_user_admins = apiT_user_adminMapper.findT_user_adminsByUser_name(user_name);
		return t_user_admins;
    }
    		
    
    
}


